import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    component: () => import('./Home.vue')
  },
  {
    path: '/capture',
    component: () => import('./Capture.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

router.afterEach((to, from) => {
  window.api.send('router-finish', { to: to.path, from: from.path })
})

export default router
